import Vue from 'vue';
import Router from 'vue-router';

Vue.use(Router);

const routes = [
    {
        path: '/',
        name: 'Home',
        redirect: '/salesman',
        component: () => import('../views/Home.vue'),
        children: [
            {
                path: 'project*',
                name: 'project',
                component: () => import('../views/Home.vue'),
            },
            {
                path: 'salesman*',
                name: 'salesman',
                component: () => import('../views/Home.vue'),
            },
        ],
    },
    {
        path: '404',
        name: '404',
        component: () => import('../views/notFount.vue'),
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('../views/Login.vue'),
    },
    // {
    //     path: '*',
    //     name: 'notfound',
    //     component: () => import('../views/notFount.vue')
    // }
];

export default new Router({
    mode: 'history',
    base: '/',
    routes,
});
